home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / comm / allscrpt.zip / AUTO.SCR next >
Text File  |  1987-10-17  |  7KB  |  281 lines

  1.  
  2. .   GEnie Automatic RoundTable Download Script for Qmodem 3.00+,
  3. .   This script has been modified from
  4. .   RTDOWNX  by Steven C. Barnes  (GEnie address SCB)
  5. .   The addtional parameters have been added to utilize V3.0
  6. .   The choice of roundtable has been changed to TIME
  7. .   To allow unattended downloads
  8. .   Questions ?? contact Steve Aldridge (GEnie addres S.ALDRIDGE)
  9. note   Script to access GEnie and download up to 9 XMODEM files.
  10.  
  11. .test for the first two parameters
  12. GOTO $1-A
  13. -A:
  14. note  You must enter the time to initiate the call (00:00:00 etc)
  15. note  and   ONE FILENAME or FILENUMBER (maximum of 9), to get from GEnie.
  16. note  DOWNLOAD SCRIPT IS ABORTING!  (Sorry!)
  17. RETURN
  18.  
  19. .Okay, let's begin.
  20.  
  21. $1-A:
  22. beep 2000
  23. beep 1000
  24. note    TIME to access:   "$0"
  25. note    XMODEM files to get:  "$1" "$2" "$3" "$4"
  26. note    "$5" "$6" "$7" "$8" "$9"
  27. note    If the above is NOT CORRECT, Press Escape Now!
  28. note    (a short pause to consider...)
  29. beep 2000
  30. beep 1000
  31. .6 second pause
  32. send "~~~~~~~~~~~~"   
  33.  
  34. TURNOFF XON\XOFF NOISE
  35. .no interuptions please!
  36. WAITUNTIL $0
  37. .OK!, call GEnie...
  38.  
  39. RETRY:
  40. DIAL "1"   .GEnie is #1! (on my system)
  41. note *******  Auto Log-on to GEnie ******
  42. TIMEOUT 10 NOGENIE  .Set timeout for bad handshake
  43. SEND "H~H~H"      .Handshake with GEnie, gently, by the book of GEnie
  44. WAITFOR "U#="
  45. TIMEOUT 60 ERROR  .setup regular error area
  46.  
  47. .Send Account# & Password, go to page 600, A VERY short menu
  48. SEND "~????????,????,615{"
  49. .Wait for end of first [mandatory] menu
  50. WAITFOR "<H>elp?"
  51.  
  52. .At menu prompt slip into high gear, COMMAND MODE.
  53. SEND "~C{"
  54. WAITFOR "P 615?"
  55. .Choose software library
  56. SEND "3{"
  57. WAITFOR "?"
  58. .Request download a file from menu
  59. SEND "6{"
  60. WAITFOR "file?"
  61. .RT activity log ON
  62. .Note you must specify the path if another other than the Qmodem
  63. .directory is desired Example (CAPTURE B:\CAPTURE\LOG.RT )
  64. CAPTURE C:\QMODEM\CAPTURE\LOG.RT  
  65. .warn user about the following short pause, not to worry!
  66. note  AUTO in progress.  One moment please...
  67.  
  68. .This area tests for each parameter, backwards from the ninth one,
  69. .then enters the main routine below at the appropriate point.
  70. .We already tested for the first parameters so all we need is...
  71.  
  72. goto $9-9
  73. -9:
  74. goto $8-8
  75. -8:
  76. goto $7-7
  77. -7:
  78. goto $6-6
  79. -6:
  80. goto $5-5
  81. -5:
  82. goto $4-4
  83. -4:
  84. goto $3-3
  85. -3:
  86. goto $2-2
  87. -2:
  88. goto $1-1
  89.  
  90. .Main Routines area
  91. .After entering at the right label below, scripts flow/fall through to end.
  92.  
  93.  
  94. .XMODEM DOWNLOAD MAIN ROUTINES
  95. .Note if a path other than the default is desired you must modify
  96. .the download command in all 9 routines ($9-9 thru $9-1)
  97. .Example (DOWNLOAD B:\DLOADS\$9 X) 
  98. $9-9:
  99. note  [9]  "$9"         .TASK #9, show the task name!
  100. SEND "$9{"              .request the desired file
  101. WAITFOR "or <Q>uit."    .wait for the download prompt
  102. SEND "~D{"              ."d" is for download
  103. WAITFOR "receive file." .wait for start of transmit
  104. DOWNLOAD C:\QMODEM\DLOAD\$9 X           .download with XMODEM  protocol
  105. WAITFOR "<RETURN>?"     .XMODEM download ends automatically
  106. SEND "{"                .press return
  107. WAITFOR "another file (Y/N)?"
  108. SEND "Y{"          .say yes for each time, except for the last file
  109. WAITFOR "file?"    .we waitfor this next prompt ONLY after saying yes
  110. . the rest repeats the above nine times
  111. . comments have been deleted to keep it all shorter
  112.  
  113. $8-8:
  114. note  [8]  "$8"      
  115. SEND "$8{"           
  116. WAITFOR "or <Q>uit." 
  117. SEND "~D{"             
  118. WAITFOR "receive file."
  119. DOWNLOAD C:\QMODEM\DLOAD\$8 X         
  120. WAITFOR "<RETURN>?"   
  121. SEND "{"              
  122. WAITFOR "another file (Y/N)?"
  123. SEND "Y{"         
  124. WAITFOR "file?"   
  125.  
  126. $7-7:
  127. note  [7]  "$7"         
  128. SEND "$7{"              
  129. WAITFOR "or <Q>uit."    
  130. SEND "~D{"              
  131. WAITFOR "receive file." 
  132. DOWNLOAD C:\QMODEM\DLOAD\$7 X      
  133. WAITFOR "<RETURN>?"
  134. SEND "{"          
  135. WAITFOR "another file (Y/N)?"
  136. SEND "Y{"         
  137. WAITFOR "file?"   
  138.  
  139. $6-6:
  140. note  [6]  "$6"        
  141. SEND "$6{"             
  142. WAITFOR "or <Q>uit."   
  143. SEND "~D{"             
  144. WAITFOR "receive file."
  145. DOWNLOAD C:\QMODEM\DLOAD\$6 X       
  146. WAITFOR "<RETURN>?" 
  147. SEND "{"          
  148. WAITFOR "another file (Y/N)?"
  149. SEND "Y{"         
  150. WAITFOR "file?"   
  151.  
  152. $5-5:
  153. note  [5]  "$5"        
  154. SEND "$5{"             
  155. WAITFOR "or <Q>uit."   
  156. SEND "~D{"             
  157. WAITFOR "receive file."  
  158. DOWNLOAD C:\QMODEM\DLOAD\$5 X       
  159. WAITFOR "<RETURN>?" 
  160. SEND "{"          
  161. WAITFOR "another file (Y/N)?"
  162. SEND "Y{"         
  163. WAITFOR "file?"   
  164.  
  165. $4-4:
  166. note  [4]  "$4"        
  167. SEND "$4{"             
  168. WAITFOR "or <Q>uit."   
  169. SEND "~D{"             
  170. WAITFOR "receive file."
  171. DOWNLOAD C:\QMODEM\DLOAD\$4 X          
  172. WAITFOR "<RETURN>?"    
  173. SEND "{"           
  174. WAITFOR "another file (Y/N)?"
  175. SEND "Y{"          
  176. WAITFOR "file?"    
  177.  
  178.  
  179. $3-3:
  180. note  [3]  "$3"
  181. SEND "$3{"
  182. WAITFOR "or <Q>uit."
  183. SEND "~D{"
  184. WAITFOR "receive file."
  185. DOWNLOAD C:\QMODEM\DLOAD\$3 X
  186. WAITFOR "<RETURN>?"
  187. SEND "{"
  188. WAITFOR "another file (Y/N)?"
  189. SEND "Y{"
  190. WAITFOR "file?"
  191.  
  192. $2-2:
  193. note  [2]  "$2"
  194. SEND "$2{"
  195. WAITFOR "or <Q>uit."
  196. SEND "~D{"
  197. WAITFOR "receive file."
  198. DOWNLOAD C:\QMODEM\DLOAD\$2 X
  199. WAITFOR "<RETURN>?"
  200. SEND "{"
  201. WAITFOR "another file (Y/N)?"
  202. SEND "Y{"
  203. WAITFOR "file?"
  204.  
  205. $1-1:
  206. note  [1]  "$1"
  207. SEND "$1{"
  208. WAITFOR "or <Q>uit."
  209. SEND "~D{"
  210. WAITFOR "receive file."
  211. DOWNLOAD C:\QMODEM\DLOAD\$1 X
  212. WAITFOR "<RETURN>?"
  213. SEND "{"
  214. WAITFOR "another file (Y/N)?"
  215.   
  216. .no task for $0 here, falling through to...
  217. .end of the task routines
  218.  
  219. .RT capture file off
  220. CAPTURE OFF
  221. SEND "N{"  .say no more files please
  222. WAITFOR "?" .get to a GEnie page#
  223.  
  224. .GENIE log off routine
  225. note        Logging-off GEnie!
  226. SEND "BYE{"
  227. WAITFOR "day!"
  228. .GE log file on
  229. CAPTURE LOG.GE
  230. WAITFOR "OFF AT"       .good, GEnie is hanging up
  231. .close general log
  232. CAPTURE OFF
  233. TIMEOUT 7 NOERROR      .make it ok to timeout in here.
  234. WAITFOR "NO CARRIER"  
  235. .cleans the screen up, gobbles garbage but no real error if timeout
  236. NOERROR:
  237. note .
  238. note            AUTO completed successfully!  ON AT   "$0"
  239. note         We got files "$1", "$2", "$3".
  240. note                      "$4", "$5", "$6".
  241. note                      "$7", "$8", "$9".
  242. RETURN
  243.  
  244. ERROR:
  245. .if script is running unattended, wait 20 secs, then hang up to be good
  246. note  THIS SCRIPT HAS FAILED   .
  247. note  The filename may not exist on GEnie, it may be an illegal DOS name,
  248. note  or another failure.  Check ScrollBack and RT log file "RT.LOG".
  249. note  This Script has failed using parameters:
  250. note  TIME: "$0" Files: "$1" "$2" "$3"
  251. note                    "$4" "$5" "$6"
  252. note                    "$7" "$8" "$9"
  253. beep  500
  254. beep  600
  255. beep  700
  256. note  PRESS ESCAPE NOW!!    
  257. .      1 2 3 4 5 6 7 8 9 0
  258. SEND "~~~~"
  259. beep  500
  260. beep  600
  261. beep  700
  262. note  PRESS ESCAPE NOW!!    
  263. SEND "~~~~~~~~~~~~~~~~~~"
  264. TIMEOUT 5 EHANGUP
  265. .waitfor here to catch escape key
  266. WAITFOR "anything"
  267. EHANGUP:
  268. .nobody is home, hangup for safety
  269. HANGUP
  270. RETURN
  271.  
  272. NOGENIE:
  273. .handshaking/log-on error
  274. beep 100
  275. beep 100
  276. note  We never got onto GEnie, sorry!
  277. HANGUP
  278. RETURN
  279. .end of script
  280.